#ifndef _COMPARABLE_H
#define _COMPARABLE_H

#include <iostream>

class Comparable {
public:
	Comparable(int _a = 0, int _b = 0) : a(_a), b(_b) {}

	friend bool operator>(const Comparable& Comparable1, const Comparable& Comparable2);
	
	friend bool operator<(const Comparable& Comparable1, const Comparable& Comparable2);

	friend bool operator>=(const Comparable& Comparable1, const Comparable& Comparable2);
	
	friend bool operator<=(const Comparable& Comparable1, const Comparable& Comparable2);

	friend bool operator==(const Comparable& Comparable1, const Comparable& Comparable2);

	friend std::ostream& operator<<(std::ostream& os, const Comparable& val);
private:

	int a;
	int b;

};

bool operator>(const Comparable& comparable1, const Comparable& comparable2) {
	if (comparable1.a > comparable2.a && comparable1.a > comparable2.b) return true;
	return false;
}

bool operator<(const Comparable& comparable1, const Comparable& comparable2) {
	if (comparable1.a > comparable2.a && comparable1.b > comparable2.b) return false;
	return true;
}

bool operator>=(const Comparable& comparable1, const Comparable& comparable2) {
	if (comparable1.a >= comparable2.a && comparable1.b >= comparable2.b) return true;
	return false;
}

bool operator<=(const Comparable& comparable1, const Comparable& comparable2) {
	if (comparable1.a >= comparable2.a && comparable1.b >= comparable2.b) return false;
	return true;
}

bool operator==(const Comparable& comparable1, const Comparable& comparable2) {
	if (comparable1.a == comparable2.a && comparable1.b == comparable2.b) return true;
	return false;
}


std::ostream& operator<<(std::ostream& os, const Comparable& val) {
	os << val.a << " " << val.b;
	return os;
}

#endif /* _COMPARABLE_H */
